package com.jingyanzi.privilege.service;

import com.jingyanzi.privilege.domain.EmployeeDO;
import com.jingyanzi.privilege.domain.LoginDO;
import com.jingyanzi.privilege.domain.UserDO;
import com.jingyanzi.privilege.domain.result.ResultDO;
import com.jingyanzi.privilege.query.EmployeeQueryDO;
import com.jingyanzi.privilege.query.UserQueryDO;
/**
 * @author 伟大的 Great emperor of Reading.Reagan
 * @Description:用户管理接口
 */
public interface IEmployeeService {
	/**
	 * 验证用户
	 * @param userDO
	 * @return ResultDO
	 */
	public ResultDO verification(LoginDO loginDO);
	
	/**
	* <b>Description:修改用户登录密码</b><br> 
	* @param userDO
	* @return
	* ResultDO 
	* @Note
	* <b>Author:</b> Reading.Reagan
	* <br><b>Date:</b> 2018年7月16日 下午6:44:03
	* <br><b>Version:</b> 1.0
	 */
	public ResultDO modifiPassCode(UserDO userDO);
	
	/**
	* <b>Description:用户通过用户名密码登录</b><br> 
	* @param loginDO
	* @return
	* ResultDO 
	* @Note
	* <b>Author:</b> Reading.Reagan
	* <br><b>Date:</b> 2018年7月16日 下午6:44:20
	* <br><b>Version:</b> 1.0
	 */
	public ResultDO userLogin(LoginDO loginDO);
	
	public ResultDO checkRepeat(UserDO userDO);
	
	public ResultDO checkEmployeeRepeat(EmployeeDO domain);
	
	public ResultDO addUser(UserDO userDO);
	
	public ResultDO modifUser(UserDO userDO);
	
	public ResultDO restPassword(UserDO userDO);
	
	public ResultDO removeUser(Integer id);
	/**
	 * 生成密码
	 * @param mobile
	 * @return ResultDO
	 */
	public ResultDO generateVerification(String mobile);
	
	
	public ResultDO checkToken(String token, long timestamp);
	
	/**
	 * 注册用户
	 * @param employeeDO
	 * @return ResultDO
	 */
	public ResultDO register(EmployeeDO employeeDO);
	/**
	 * 打开登录
	 * @param userDO
	 * @return ResultDO
	 */
	public ResultDO openLogin(UserDO userDO);
	
	
	public ResultDO closeUser(Integer id);
	
	/**
	 * 修改员工
	 * @param employeeDO
	 * @return ResultDO
	 */
	public ResultDO modifi(EmployeeDO employeeDO);
	/**
	 * 删除用户
	 * @param id
	 * @return ResultDO
	 */
	public ResultDO remove(Integer id);
	/**
	 * 修改用户角色
	 * @param userDO
	 * @return ResultDO
	 */
	public ResultDO updateRole(UserDO userDO);
	/**
	 * 返回用户数据
	 * @param id
	 * @return ResultDO
	 */
	public ResultDO getUser(Integer id);
	
	/**
	 * 返回员工数据
	 * @param id
	 * @return ResultDO
	 */
	public ResultDO getEmployee(Integer id);
	
	/**
	 * 查询员工
	 * @param query
	 * @return ResultDO
	 */
	public ResultDO queryEmployee(EmployeeQueryDO query);
	
	public ResultDO queryEmployeeByCode(EmployeeQueryDO query);
	
	/**
	 * 查询用户
	 * @param query
	 * @return ResultDO
	 */
	public ResultDO queryUser(UserQueryDO query);
	
	/**
	 * 查询用户的角色信息id
	 * @param query
	 * @return ResultDO
	 */
	public ResultDO getRole(Integer id);
	
	
	public ResultDO userDeleteOrClose(Integer id);
}
